﻿using System;
using wojilu.ORM;

namespace wojilu.Apps.Qycms.Domain
{
    [Table("ybb_bbs")]
    [Serializable]
    public class Bbs : ObjectBase<Bbs>
    {
        [Column(Length = 11), NotNull(""), Default(0)]
        public Int64 btid { get; set; }

        [Column(Length = 11), NotNull(""), Default(0)]
        public Int64 upbid { get; set; }

        [Column(Length = 11), NotNull(""), Default(0)]
        public Int64 adminid { get; set; }

        [Column(Length = 11), NotNull(""), Default(0)]
        public Int64 userid { get; set; }

        [NotNull(""), Column(Length = 50), Default("cn")]
        public String lng { get; set; }

        [NotNull(""), Column(Length = 250)]
        public String title { get; set; }

        [LongText]
        public String content { get; set; }

        [Column(Length = 250)]
        public String username { get; set; }

        [Column(Length = 150)]
        public String email { get; set; }

        [Column(Length = 11), Default("0")]
        public String qq { get; set; }

        [Column(Length = 100)]
        public String msn { get; set; }

        [Column(Length = 200)]
        public String address { get; set; }

        [Column(Length = 50)]
        public String tel { get; set; }

        [Column(Length = 50)]
        public String mobile { get; set; }

        [NotNull(""), Column(Length = 6), Default(0)]
        public Int32 replynum { get; set; }

        [NotNull(""), Column(Length = 11), Default(0)]
        public Int32 click { get; set; }

        [NotNull("")]
        public DateTime addtime { get; set; }

        public DateTime retime { get; set; }

        [TinyInt, NotNull(""), Column(Length = 1), Default(1)]
        public Int32 isclass { get; set; }

        [TinyInt, NotNull(""), Column(Length = 1), Default(0)]
        public Int32 istop { get; set; }

        [NotNull(""), Column(Length = 11), Default("")]
        public String ipadd { get; set; }

        [NotSave]
        public Bbs_TypeList bbstype
        {
            get
            {
                return Bbs_TypeList.findById(btid);
            }
        }
    }
}
